export interface responsedata {
  code: number;
  message: string;
  ok: boolean;
}

//职位角色的ts类型
export interface RoleData {
  id?: number;
  createTime?: string;
  updateTime?: string;
  roleName: string;
  remark?: null;
}

//全部职位数组的ts类型
export type Records = RoleData[];

export interface RoleResponseData extends responsedata {
  data: {
    records: Records;
    total: number;
    size: number;
    current: number;
    orders: [];
    optimizeCountSql: boolean;
    hitCount: boolean;
    countId: null;
    maxLimit: null;
    searchCount: boolean;
    pages: number;
  };
}

//菜单与按钮权限的类型
export interface MenuData {
  id: number;
  createTime: string;
  updateTime: string;
  pid: number;
  name: string;
  code?: string | null;
  toCode?: string | null;
  type: number;
  status?: number | null;
  level: number;
  children: MenuDataList;
  select: boolean;
}

export type MenuDataList = MenuData[];

//菜单与按钮权限接口数据的类型
export interface MenuResponseData extends responsedata {
  data: MenuDataList;
}
